package cn.chia.service;

import java.util.List;
import java.util.Map;

import cn.chia.pojo.TblActivity;
import cn.chia.pojo.TblActivityType;
import cn.chia.pojo.TblItems;

public interface IActivityService {
	
	/**
	 * @author Administrator
	 * @param activity
	 * @Todo 添加新活动。
	 * @throws Exception
	 */
	public void addActivity(TblActivity activity)throws Exception;
	
	/**
	 * @author Administrator
	 * @param activityId 
	 * @Todo 删除原有的活动。
	 * @throws Exception
	 */
	public void removeActivity(Integer activityId)throws Exception;
	
	/**
	 * @author Administrator
	 * @param activity
	 * @Todo 修改原有活动
	 * @throws Exception
	 */
	public void modifyActivity(TblActivity activity)throws Exception;
	
	/**
	 * @author Administrator
	 * @param pageNo
	 * @param pageSize
	 * @param keyword
	 * @param column
	 * @return map
	 * @将dao层的getAllCount()方法和findAll()方法的返回值分别封装成map集合并将map集合返回。
	 * @throws Exception
	 */
	public Map<?,?> findAllActivity(int pageNo, int pageSize, String keyword,String column) throws Exception;
	
	/**
	 * @author Administrator
	 * @param activityId
	 * @return Activity实体类
	 * @Todo 按照id查询某一条记录。
	 * @throws Exception
	 */
	public TblActivity getActivityById(Integer activityId)throws Exception;

	/**
	 * @author Administrator
	 * @Todo 查询活动的全部种类
	 * @return 活动种类的list集合
	 * @throws Exception
	 */
	public List<TblActivityType> findAllActivityType()throws Exception;
	
	
	public void modifyActivityInItems(String itemId,Integer activityId) throws Exception;
		
	//通过id找活动
	public TblActivity findById(Integer id) throws Exception;
	
	
}
